package com.atguigu.userservice.entity.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

//请求类
public class UserRequestVo {


    @Data
    public static class UserQueryVo {
        private String type; //1.用户类型
        private String nickname;//2.昵称
        private String mobile;//3.手机
        private String beginTime;
        private String endTime;
        private String isChecked;
    }


    @Data
    public static class ModifyRepUserVo {

        private String id;//用户id

        private String shopName;
        private String shopDescription;
        private String zhiFuBao;
        @ApiModelProperty(value = "昵称")
        private String nickname;
        @ApiModelProperty(value = "手机号")
        private String mobile;
        @ApiModelProperty(value = "密码")
        private String password;
        @ApiModelProperty(value = "验证码")
        private String code;
        private String address;
    }

    //6.商家分页查询条件
    @Data
    public static class MerchantQueryObject {

        private String brankName; //品牌
        private String area;//所在地区
        private String isChecked; //审核情况

        private String subjectId; //二级id
        private String subjectParentId;//一级id

        private String byDefault; //默认
        private String byCreateTime;//按时间
        private String byShopName;//店铺名字
    }


    //5.手机是否已经注册过
    @Data
    public class MobileExitVo {
        @Pattern(regexp = "^[1]\\d{10}$", message = "请输入正确的手机账号")
        private String mobile;
    }

    //4.修改其他信息
    @Data
    public static class ModifyOtherMessageVo {

    }


    //3.修改密码
    @Data
    public static class ModifyPasswordVo {
        @Pattern(regexp = "^[1]\\d{10}$", message = "请输入正确的手机账号")
        private String mobile;

        @NotBlank(message = "验证码不能为空")
        private String code;

        @NotBlank(message = "密码不能为空")
        private String password;//密码
    }


    //2、登录对象
    @Data
    public static class LoginVo {
        @NotBlank(message = "登录账号不能为空")
        @Pattern(regexp = "^[1]\\d{10}$", message = "请输入正确的手机账号")
        private String mobile;//账号
        @NotBlank(message = "密码不能为空")
        private String password;//密码
    }


    //1、注册对象
    @Data
    public static class RegisterVo {

        private String community; //所在社区
        private String area;//所在区县
        private String zhiFuBao;//支付宝账号

        @ApiModelProperty(value = "类型 1普通用户 2商家用户")
        private String type;

        @ApiModelProperty(value = "联系方式")
        @NotBlank(message = "登录账号不能为空")
        @Pattern(regexp = "^[1]\\d{10}$", message = "请输入正确的手机账号")
        private String mobile;

        private String code;//验证码

        @ApiModelProperty(value = "店铺名称")
        private String shopName;

        @ApiModelProperty(value = "店铺简述")
        private String shopDescription;

        @ApiModelProperty(value = "昵称")
        @NotBlank(message = "昵称不能为空")
        private String nickname;

        @ApiModelProperty(value = "密码")
        @NotBlank(message = "密码不能为空")
        private String password;

        private String address;//商铺地址

        @ApiModelProperty(value = "商家审核凭据")
        private String evidence;

        @ApiModelProperty(value = "门店照片")
        private String avatar;

        @ApiModelProperty(value = "商家所在一级行业id")
        private String subjectId;

        @ApiModelProperty(value = "商家所在行业二级id")
        private String subjectParentId;
    }
}
